package com.hist.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface LoginDao {
	
	     @Select("select count(*) from studentmanagement.login where username=#{username}")
	     Integer checkUsername(Integer username);
	     @Insert("insert into studentmanagement.login values(#{username},#{password}")
	     void insertLogin(Integer username,String password);
	     /*注册信息*/
	     @Insert("insert into studentmanagement.student(sno,sname,ssex,sage,sdept,smajor,sgrade,school_length,saddress,spol,snation,srp,smove) values(#{sno},#{sname},#{ssex},#{sage},#{sdept},#{smajor},#{sgrade},#{school_length},#{saddress},#{spol},#{snation},#{srp},#{smove})")
		 void insertStudent(Integer sno,String sname,String ssex,Integer sage,String sdept,String smajor,Integer sgrade,Integer school_length,String saddress,String spol,String snation,String srp,String smove);
         @Select("select count(*) from studentmanagement.login where username=#{username} and password=#{password}")
         Integer getLogin(Integer username,String password);
         

}